import React from 'react';
import { Link, Outlet } from 'react-router-dom';

function App() {
  return (
    <div>
      <h1>Todolist-react-router-v6</h1>
      <nav
        style={{
          borderBottom: 'solid #000',
          paddingBottom: '1rem'
        }}
      >
        <Link to="/invoices">Invoices</Link> |{' '}
        <Link to="/expenses">Expenses</Link>
      </nav>
      {/* Outlet类似于插槽，作用是：插入子路由组件的位置 */}
      <Outlet></Outlet>
    </div>
  );
}

export default App;
